package jdk8的特性.Stream.跳过元素;

/**
 * @author idea
 * @data 2018/9/8
 */

public class User {

    private int id;

    private String username;

    private int sex;

    private int age;


    //作为谓词的方法必须要是静态类型
    public static boolean isGril(User user) {
        return user.getSex()==1;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public User(int id, String username, int sex, int age) {
        this.id = id;
        this.username = username;
        this.sex = sex;
        this.age = age;
    }
}
